import request from '@/config/axios'

export interface DrawingComponentVO {
  id: number
  productType: string
  dictComponentStatus: number
}

// 查询配置中心-制图管理-部件档案列表
export const getDrawingComponentPage = async (params) => {
  return await request.get({ url: `/config/drawing-component/page`, params })
}

// 查询配置中心-制图管理-部件档案详情
export const getDrawingComponent = async (id: number) => {
  return await request.get({ url: `/config/drawing-component/get?id=` + id })
}

// 新增配置中心-制图管理-部件档案
export const createDrawingComponent = async (data: DrawingComponentVO) => {
  return await request.post({ url: `/config/drawing-component/create`, data })
}

// 修改配置中心-制图管理-部件档案
export const updateDrawingComponent = async (data: DrawingComponentVO) => {
  return await request.put({ url: `/config/drawing-component/update`, data })
}

// 删除配置中心-制图管理-部件档案
export const deleteDrawingComponent = async (id: number) => {
  return await request.delete({ url: `/config/drawing-component/delete?id=` + id })
}

// 导出配置中心-制图管理-部件档案 Excel
export const exportDrawingComponent = async (data) => {
  return await request.download({ url: `/config/drawing-component/export-excel`, data })
}
